﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Web.Api.Server.Models
{
    [Table(Name = "shops")]
    [Index("uk_name", "name", true)]
    public class Shop
    {
        [Column(Name = "id", IsIdentity = true)]
        public int Id { get; set; }

        [Column(Name = "name", StringLength = 255)]
        public string Name { get; set; }

        [Column(Name = "describe", StringLength = 255)]
        public string Describe { get; set; }

        [Column(Name = "moblie", StringLength = 255)]
        public string Mobile { get; set; }

        [Column(Name = "wechat", StringLength = 255)]
        public string WeChat { get; set; }

        [Column(Name = "user_id")]
        public int UserId { get; set; }

        [Column(Name = "created_at", IsNullable = true)]
        public DateTime? CreatedAt { get; set; } = DateTime.Now;

        [Column(Name = "updated_at", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; } = DateTime.Now;
    }
}
